# 链接 https://juejin.im/post/6844903999032786952
# 使用 aws 的java jdk 8
FROM amazoncorretto:8
# 作者等相关的元信息
LABEL AUTHOR=Felordcn OG=felord.cn
# 挂载卷 
VOLUME ["/tmp","/logs"]
# 时区
ENV TZ=Asia/Shanghai
# 启用配置文件 默认为 application.yml  
ENV ACTIVE=defualt
# 设置镜像时区
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 修改为打包后的jar文件名称
ADD /target/flyway-spring-boot-1.0.0.jar app.jar
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dspring.profiles.active=${ACTIVE}","-jar","app.jar"]

